//
//  HomeButton.swift
//  WeiBo
//
//  Created by 江潘 on 15/6/29.
//  Copyright © 2015年 江潘. All rights reserved.
//

import UIKit

class HomeButton: UIButton {

    override func layoutSubviews() {
        
       super.layoutSubviews()
        
        if imageView?.frame.origin.x < titleLabel?.frame.origin.x{
        
            titleLabel?.frame.origin.x = (imageView?.frame.origin.x)!
            
            imageView?.frame.origin.x = CGRectGetMaxX((titleLabel?.frame)!)
        }
    }
}
